import request from '@/utils/request'

//  部门列表
export const getDepartment = () => request.get('/company/department')

//  部门负责人列表
export const getDepartmentList = () => request.get('/sys/user/simple')

// 添加部门
export const addPost = (data) => request.post('/company/department', data)

// 修改部门数据
export const updatePut = (data) => request.put(`/company/department/${data.id}`, data)

//  获取部门详情 数据回显
export function updateDept(id) {
  return request({
    url: `/company/department/${id}`
  })
}

//  删除部门
export const updateDel = (id) => request.delete(`/company/department/${id}`)

